<template>
  <div class="main">
      <div slot="header" class="clearfix">
        <el-row>
          <el-col :span="22" class="article-title">
              流程开发组件
          </el-col>
         
            
        </el-row>
        
      </div>
      <div class="tl">
        <el-row :gutter='60'>
          <el-col :span="2">快乐八</el-col>
          <el-col :span="3"><el-button type="primary" size="mini" @click="getNum">生成号码</el-button></el-col>
          <el-col :span="3"><el-button type="primary" size="mini" @click="numSort">排序</el-button></el-col>
          <el-col :span="3"><el-button type="primary" size="mini" @click="numChoose">上期三个</el-button></el-col>
        </el-row>
        <el-table
          :data="tableData"
          style="width: 100%">
          
          <el-table-column  prop="num1" label="1号"  />
          <el-table-column  prop="num2" label="2号"  />
          <el-table-column  prop="num3" label="3号"  />
          <el-table-column  prop="num4" label="4号"  />
          <el-table-column  prop="num5" label="5号"  />
          <el-table-column  prop="num6" label="6号"  />
          <el-table-column  prop="num7" label="7号"  />
          <el-table-column  prop="num8" label="8号"  />
          <el-table-column  prop="num9" label="9号"  />
          <el-table-column  prop="num0" label="10号"  />
    </el-table>
      <div>{{itemList}}</div>
       <div>{{chooseNum}}</div>
      </div>
      
      
      
  </div>
</template>

<script>

export default {
  name: 'hzjmain',
  components: {
  },
  props: {
    msg: String
  },
  data() {
    return {
      title:'流程管理',
      tableData:[],
      itemList:[],
      chooseNum:[],
     
    }
  },
  methods:{
    
      getNum(){

        let item ={}
        for(let i =0;i<10;i++){
          item['num'+(i)] =Math.floor(Math.random()*(80-1+1)+1)
          this.itemList.push(item['num'+(i)])
        }
        debugger
        this.tableData.push(item)
      },
      numSort(){
        this.itemList.sort()
        this.chooseNum.sort()
      },
      numChoose(){
        let last = ['01', '04','12','13','19','28','30','34','35','37','39','42','46','49','55','61','64','67','68','79']
        for(let i =0;i<10;i++){
          this.chooseNum.push(last[Math.floor((Math.random()*20)-1)])
        }
        
      }

  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
h3 {
  margin: 40px 0 0;
}
ul {
  list-style-type: none;
  padding: 0;
}
li {
  display: inline-block;
  margin: 0 10px;
}
a {
  color: #42b983;
}
</style>
